package dto

import (
	"github.com/gin-gonic/gin"
	"tino_manager/public"
)

type CollectInput struct {
	SiteId string `json:"site_id" form:"site_id" comment:"场地Id" validate:"required"`
}

func (params *CollectInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type CollectDetailInput struct {
	SiteId string `json:"site_id" form:"site_id" comment:"场地id"`
	Id     string `json:"id" form:"id" comment:"id"`
}

func (params *CollectDetailInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type CollectInfo struct {
	Id           string `json:"id" form:"id" comment:"预约id"`
	SiteId       string `json:"site_id" form:"site_id" comment:"场地id"`
	Name         string `json:"name" form:"name"`
	Address      string `json:"address" form:"address"`
	Image        string `json:"image" form:"image"`
	MaxPeopleNum string `json:"max_people_num" form:"max_people_num"`
	Facilities   string `json:"facilities" form:"facilities"`
	Phone        string `json:"phone" form:"phone"`
	Service      string `json:"service" form:"service"`
	Business     string `json:"business" form:"business"`
	Sort         int    `json:"sort" form:"sort"`
	Status       uint8  `json:"status" form:"status"`
	IsDelete     uint8  `json:"is_delete" form:"is_delete"`
	UpdatedAt    string `json:"update_at" gorm:"column:update_at;comment:更新时间"`
	CreatedAt    string `json:"create_at" gorm:"column:create_at;comment:创建时间"`
}

type CollectPageInput struct {
	KeyWord    string `json:"keyword" form:"keyword" comment:"搜索关键词"`
	PageSize   int    `json:"page_size" form:"page_size" comment:"每页数量" validate:"required,lte=20"`
	PageNumber int    `json:"page_number" form:"page_number" comment:"页码" validate:"required"`
}

func (params *CollectPageInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type CollectPageOutput struct {
	List  []CollectInfo `json:"list"`
	Total int64         `json:"total"`
}

type CollectRemoveInput struct {
	Id string `json:"id" form:"id" comment:"收藏id" validate:"required"`
}

func (params *CollectRemoveInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
